import { Theme } from '../interface'

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const createInlineNotification = (
  theme: Theme,
  compatibilityMode?: boolean
) => ({
  //#region shared
  shapeBorderRadiusTopLeft: compatibilityMode
    ? 8
    : theme.sys.shape.borderRadiusXl,
  shapeBorderRadiusTopRight: compatibilityMode
    ? 8
    : theme.sys.shape.borderRadiusXl,
  shapeBorderRadiusBottomLeft: compatibilityMode
    ? 8
    : theme.sys.shape.borderRadiusXl,
  shapeBorderRadiusBottomRight: compatibilityMode
    ? 8
    : theme.sys.shape.borderRadiusXl,

  indicatorColorBackgroundNeutral: compatibilityMode
    ? theme.colourway.support
    : theme.sys.color.neutralAlpha,
  indicatorColorBackgroundSuccess: compatibilityMode
    ? theme.colourway.success
    : theme.sys.color.successAlpha,
  indicatorColorBackgroundInfo: compatibilityMode
    ? theme.colourway.info
    : theme.sys.color.infoAlpha,
  indicatorColorBackgroundWarning: compatibilityMode
    ? theme.colourway.warning
    : theme.sys.color.warningAlpha,
  indicatorColorBackgroundError: compatibilityMode
    ? theme.colourway.error
    : theme.sys.color.errorAlpha,

  iconColorTextNeutral: compatibilityMode
    ? theme.colourway.support
    : theme.sys.color.neutralAlpha,
  iconColorTextSuccess: compatibilityMode
    ? theme.colourway.success
    : theme.sys.color.successAlpha,
  iconColorTextInfo: compatibilityMode
    ? theme.colourway.info
    : theme.sys.color.infoAlpha,
  iconColorTextWarning: compatibilityMode
    ? theme.colourway.warning
    : theme.sys.color.warningAlpha,
  iconColorTextError: compatibilityMode
    ? theme.colourway.error
    : theme.sys.color.errorAlpha,

  titleColorTextError: compatibilityMode
    ? theme.colourway.onBackgroundHigh
    : theme.sys.color.onBackgroundHigh,
  titleColorTextWarning: compatibilityMode
    ? theme.colourway.onBackgroundHigh
    : theme.sys.color.onBackgroundHigh,
  titleColorTextSuccess: compatibilityMode
    ? theme.colourway.onBackgroundHigh
    : theme.sys.color.onBackgroundHigh,
  titleColorTextNeutral: compatibilityMode
    ? theme.colourway.onBackgroundHigh
    : theme.sys.color.onBackgroundHigh,
  titleColorTextInfo: compatibilityMode
    ? theme.colourway.onBackgroundHigh
    : theme.sys.color.onBackgroundHigh,
  titleTypographyFontFamily: compatibilityMode
    ? theme.typography.fontFamily.text
    : theme.sys.typography.bodyMd.fontFamily,
  titleTypographyFontWeight: compatibilityMode
    ? theme.typography.fontWeight.semibold
    : theme.ref.typography.fontWeight.semiBold,
  titleTypographyFontSize: compatibilityMode
    ? theme.typography.fontSize.body2
    : theme.sys.typography.bodyMd.fontSize,
  titleTypographyLineHeight: compatibilityMode
    ? theme.typography.lineHeight.body2
    : theme.sys.typography.bodyMd.lineHeight,
  titleTypographyLetterSpacing: compatibilityMode
    ? theme.typography.letterSpacing.body2
    : theme.sys.typography.bodyMd.letterSpacing,

  contentColorTextError: compatibilityMode
    ? theme.colourway.onBackgroundMedium
    : theme.sys.color.onBackgroundMedium,
  contentColorTextWarning: compatibilityMode
    ? theme.colourway.onBackgroundMedium
    : theme.sys.color.onBackgroundMedium,
  contentColorTextSuccess: compatibilityMode
    ? theme.colourway.onBackgroundMedium
    : theme.sys.color.onBackgroundMedium,
  contentColorTextNeutral: compatibilityMode
    ? theme.colourway.onBackgroundMedium
    : theme.sys.color.onBackgroundMedium,
  contentColorTextInfo: compatibilityMode
    ? theme.colourway.onBackgroundMedium
    : theme.sys.color.onBackgroundMedium,
  contentTypographyFontFamily: compatibilityMode
    ? theme.typography.fontFamily.text
    : theme.sys.typography.bodyMd.fontFamily,
  contentTypographyFontWeight: compatibilityMode
    ? theme.typography.fontWeight.regular
    : theme.sys.typography.bodyMd.fontWeight,
  contentTypographyFontSize: compatibilityMode
    ? theme.typography.fontSize.body2
    : theme.sys.typography.bodyMd.fontSize,
  contentTypographyLineHeight: compatibilityMode
    ? theme.typography.lineHeight.body2
    : theme.sys.typography.bodyMd.lineHeight,
  contentTypographyLetterSpacing: compatibilityMode
    ? theme.typography.letterSpacing.body2
    : theme.sys.typography.bodyMd.letterSpacing,
  //#endregion shared

  //#region outlined
  colorBackgroundOutlined: 'transparent',
  colorBorderOutlinedError: compatibilityMode
    ? theme.colourway.error
    : theme.sys.color.errorAlpha,
  colorBorderOutlinedWarning: compatibilityMode
    ? theme.colourway.warning
    : theme.sys.color.warningAlpha,
  colorBorderOutlinedSuccess: compatibilityMode
    ? theme.colourway.success
    : theme.sys.color.successAlpha,
  colorBorderOutlinedInfo: compatibilityMode
    ? theme.colourway.info
    : theme.sys.color.infoAlpha,
  colorBorderOutlinedNeutral: compatibilityMode
    ? theme.colourway.mono05
    : theme.sys.color.neutralAlpha,
  //#endregion outlined

  //#region filled
  colorBackgroundFilledError: '#FDDFDD',
  colorBackgroundFilledWarning: '#FEF2C0',
  colorBackgroundFilledSuccess: '#DCFAE2',
  colorBackgroundFilledInfo: '#E8F5FE',
  colorBackgroundFilledNeutral: '#F3F3F3',

  colorBorderFilledError: 'transparent',
  colorBorderFilledWarning: 'transparent',
  colorBorderFilledSuccess: 'transparent',
  colorBorderFilledInfo: 'transparent',
  colorBorderFilledNeutral: 'transparent',

  elevationShadowFilled: '',
  //#endregion filled
})
